package com.gmadmin.controller;


import com.gmadmin.common.ApiResponse;
import com.gmadmin.entity.vo.api.SysApiVo;
import com.gmadmin.service.SysApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhangsan
 * @since 2021-12-28
 */
@Api(tags = "系统: api管理")
@RestController
@RequestMapping("api/system/api")
public class SysApiController {


    private final SysApiService service;

    public SysApiController(SysApiService service) {
        this.service = service;
    }

    @ApiOperation(value = "所有api")
    @GetMapping
    public ApiResponse<List<SysApiVo>> findAllApi() {
        return ApiResponse.ofSuccess(service.findAllAuthApi());
    }
}
